using System;
using UnityEngine;
using UnityEngine.UI;

namespace CGF
{
    //该脚本自动生成或覆盖，不可编辑
    public partial class PanelMyTrainingDetail
    {   
		public ScrollView ScrollView;
		public CButton BtnClose;
		public Text TextOrderNo;
		public Text TextTime;
		public Text TextState;
		public I18N i18n;

        public Reference reference { get; private set; }
        public Action onProsBindCompleted;
        
        public void BindProperties(Transform transform)
        {   
            reference = transform.GetComponent<Reference>();
            if(!reference)return;
            int nodeIndex = 0;
			ScrollView = (reference.nodes[nodeIndex++].obj as GameObject).GetComponent<ScrollView>();
			BtnClose = (reference.nodes[nodeIndex++].obj as GameObject).GetComponent<CButton>();
			TextOrderNo = (reference.nodes[nodeIndex++].obj as GameObject).GetComponent<Text>();
			TextTime = (reference.nodes[nodeIndex++].obj as GameObject).GetComponent<Text>();
			TextState = (reference.nodes[nodeIndex++].obj as GameObject).GetComponent<Text>();
			i18n = transform.GetComponent<I18N>();
            onProsBindCompleted?.Invoke();
        }
        
        public void SetProsBindCompletedAction(Action action)
        {
            onProsBindCompleted = action;
        }

		public string I18N_order_no { get { return i18n.GetTextByKey("order_no"); } }
		public string I18N_state { get { return i18n.GetTextByKey("state"); } }
		public string I18N_time { get { return i18n.GetTextByKey("time"); } }
		public string I18N_review { get { return i18n.GetTextByKey("review"); } }
		public string I18N_reject { get { return i18n.GetTextByKey("reject"); } }
		public string I18N_passed { get { return i18n.GetTextByKey("passed"); } }
		public string I18N_reason { get { return i18n.GetTextByKey("reason"); } }
    }
}
